home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Super Shareware Collection
/
Super Shareware Collection.iso
/
info
/
rcntx323.zip
/
TRANSFER.EXE
/
BREAKIT.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-11-24
|
2KB
|
69 lines
10 ON ERROR GOTO 480
20 D$(1)="-":D$(2)="\":D$(3)="|":D$(4)="/"
30 D=1
40 CLS
45 if command$="" then 50
46 f$=command$
47 print "Input file selected is ";F$
48 goto 60
50 INPUT "Enter name of input file";F$
60 OPEN "i",#1,F$
70 IF LOF(1)>250000 THEN GOTO 120
80 OPEN "o",#2,"index1.bat"
90 PRINT#2,"INDEX ";F$
100 CLOSE
110 SYSTEM
120 PRINT" ╔════════════════════════════════════════════════╗"
130 PRINT" ║ BREAKING UP INPUT FILE INTO WORKING ║"
140 PRINT" ║ FILES FOR RACONTEX INDEXER ║"
150 PRINT" ╚════════════════════════════════════════════════╝"
160 O$="P!"
170 I=I+1
180 O1$=O$+"."+RIGHT$(STR$(I),LEN(STR$(I))-1)
190 OPEN"o",#2,O1$
200 LOCATE 13,1
210 PRINT " ╔═════════════════════════╗"
220 PRINT " ║ ║"
230 PRINT " ║ ║"
240 PRINT " ║ ║"
250 PRINT " ╚═════════════════════════╝"
260 LOCATE 14,21
270 PRINT "opening file ";O1$
280 LOCATE 8,1
290 PRINT " ╔═══╗"
300 PRINT " ║ ╣"
310 PRINT " ╚═══╝"
320 TAIL$=TAIL$+" "+O1$
330 LINE INPUT #1,L$
340 LOCATE 9,32:PRINT D$(D):D=D+1:IF D>4 THEN D=1
350 IF LEN(L$)>10 THEN IF RIGHT$(L$,10)=" " THEN L$=LEFT$(L$,LEN(L$)-10):GOTO 350
360 IF RIGHT$(L$,1)=" "THEN L$=LEFT$(L$,LEN(L$)-1):GOTO 360
370 CH=CH+LEN(L$)+2
380 LOCATE 16,21:PRINT "File Size = ";CH
390 PRINT#2,L$
400 IF EOF(1) THEN 430
410 IF CH>250000! THEN CLOSE 2 :CH=0:GOTO 170
420 GOTO 330
430 CLOSE
440 OPEN"o",#2,"index1.bat"
450 PRINT#2,"INDEX "+TAIL$
460 CLOSE
470 SYSTEM
480 REM error routine
490 IF ERL=60 THEN GOSUB 560:RESUME 60
500 PRINT"Please report to your system administrator error #";ERR;" at line ";ERL;" of BREAKIT"
510 PRINT "Press ENTER"
520 INPUT DUM$
530 OPEN"o",#2,"index1.bat"
540 CLOSE
550 SYSTEM
560 REM wrong file routine
570 CLS
580 PRINT "I can't open the file called ";F$
590 PRINT "What other file name should I try?"
600 PRINT "(enter NUL as a file name to abort this run)
610 INPUT F$
620 CLS
630 IF F$="NUL" OR F$="nul" GOTO 530
640 RETURN